/******************************************************************************
 * Copyright (c) 2013-2016 Realtek Semiconductor Corp.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 ******************************************************************************/

#ifndef _FREERTOS_SKBUFF_H_
#define _FREERTOS_SKBUFF_H_

#if (RTL8195A_SUPPORT == 1) || (RTL8195B_SUPPORT == 1)
// For Lextra(PCI-E like interface), RX buffer along with its skb is required to be
// pre - allocation and set into rx buffer descriptor ring during initialization.
#if (SKB_PRE_ALLOCATE_RX == 1)
#define MAX_SKB_BUF_NUM (8 + 4)		//tx+rx (8 + RX_Q_DESC_NUM) Reduce rx skb number due to memory limitation
#define MAX_LOCAL_SKB_NUM (10 + 18) //tx+rx
#else
#if WIFI_LOGO_CERTIFICATION
#define MAX_SKB_BUF_NUM 10							   //tx+rx, ping 10k test
#elif defined(CONFIG_INIC_EN) && (CONFIG_INIC_EN == 1) //For iNIC throughput request
#define MAX_SKB_BUF_NUM 59
#else
#define MAX_SKB_BUF_NUM 8 //tx+rx
#endif
#define MAX_LOCAL_SKB_NUM (MAX_SKB_BUF_NUM + 2) //tx+rx, +2: AP mode broadcast
#endif
#elif (RTL8711B_SUPPORT == 1)
#if (SKB_PRE_ALLOCATE_RX == 1)
#define MAX_SKB_BUF_NUM (8 + 4)		//tx+rx (8 + RX_Q_DESC_NUM) Reduce rx skb number due to memory limitation
#define MAX_LOCAL_SKB_NUM (10 + 18) //tx+rx
#else
#if WIFI_LOGO_CERTIFICATION
#define MAX_SKB_BUF_NUM 10							   //tx+rx, ping 10k test
#elif defined(CONFIG_INIC_EN) && (CONFIG_INIC_EN == 1) //For iNIC throughput request
#define MAX_SKB_BUF_NUM 15
#else
#define MAX_SKB_BUF_NUM 8 //tx+rx
#endif
#define MAX_LOCAL_SKB_NUM (MAX_SKB_BUF_NUM + 2) //tx+rx, +2: AP mode broadcast
#endif
#elif (RTL8721D_SUPPORT == 1)
#if (SKB_PRE_ALLOCATE_RX == 1)
#ifdef CONFIG_HIGH_TP_TEST
#define MAX_SKB_BUF_NUM (28) //tx+rx (8 + RX_Q_DESC_NUM) Reduce rx skb number due to memory limitation
#else
#define MAX_SKB_BUF_NUM (8 + 4) //tx+rx (8 + RX_Q_DESC_NUM) Reduce rx skb number due to memory limitation
#endif
#define MAX_LOCAL_SKB_NUM (10 + 18) //tx+rx
#else
#if WIFI_LOGO_CERTIFICATION
#define MAX_SKB_BUF_NUM 10							   //tx+rx, ping 10k test
#elif defined(CONFIG_INIC_EN) && (CONFIG_INIC_EN == 1) //For iNIC throughput request
#define MAX_SKB_BUF_NUM 15
#else
#define MAX_SKB_BUF_NUM 8 //tx+rx
#endif
#define MAX_LOCAL_SKB_NUM (MAX_SKB_BUF_NUM + 2) //tx+rx, +2: AP mode broadcast
#endif
#elif (RTL8710C_SUPPORT == 1)
#if (SKB_PRE_ALLOCATE_RX == 1)
#define MAX_SKB_BUF_NUM (8 + 4)		//tx+rx (8 + RX_Q_DESC_NUM) Reduce rx skb number due to memory limitation
#define MAX_LOCAL_SKB_NUM (10 + 18) //tx+rx
#else
#if WIFI_LOGO_CERTIFICATION
#define MAX_SKB_BUF_NUM 10							   //tx+rx, ping 10k test
#elif defined(CONFIG_INIC_EN) && (CONFIG_INIC_EN == 1) //For iNIC throughput request
#define MAX_SKB_BUF_NUM 15
#else
#define MAX_SKB_BUF_NUM 8 //tx+rx
#endif
#define MAX_LOCAL_SKB_NUM (MAX_SKB_BUF_NUM + 2) //tx+rx, +2: AP mode broadcast
#endif
#else
#ifndef CONFIG_DONT_CARE_TP
#ifndef CONFIG_HIGH_TP
#define MAX_LOCAL_SKB_NUM 10
#define MAX_SKB_BUF_NUM 7
#else
#define MAX_LOCAL_SKB_NUM 100
#define MAX_SKB_BUF_NUM 100
#endif
#else
#define MAX_LOCAL_SKB_NUM 10
#ifdef ACTION_QUESTION_8703B
#define MAX_TX_SKB_BUF_NUM 1
#else
#define MAX_TX_SKB_BUF_NUM 6
#endif
#define MAX_RX_SKB_BUF_NUM 1
#endif
#endif

	  extern int max_local_skb_num;
extern int max_skb_buf_num;

#endif
